#pragma once

#include "Behaviour.h"
#include "Point.h"
#include "CameraFollow.h"
#include "SignalSlot.h"

namespace game_engine { namespace library
{

/*!
 * \class Follower
 * \brief 
 */
class Follower : public game_engine::components::Behaviour
{
///////////////////////////////////////////////////////////////////////////////
// Attribute definition
///////////////////////////////////////////////////////////////////////////////
public:
    cSlot <Follower, INT32, utils::Point> slotSubjectHasMoved;

private:
    GameObject *subject;
    utils::Point initialPosition;
    utils::Point subjectPosition;
    CameraFollow *camFollow;

///////////////////////////////////////////////////////////////////////////////
// Method definition
///////////////////////////////////////////////////////////////////////////////
public:
    // Constructors and Destructors
    Follower(void);
    Follower(GameObject *obj);
    virtual ~Follower(void);

    // Others
    void initialize(void) throw(...);

    // Slots
    INT32 setSubjectPosition(utils::Point position);

    // Getters
    GameObject* getSubject(void) const;
    const utils::Point& getInitialPosition(void) const;
    const utils::Point& getSubjectPosition(void) const;

    // Setters
    void setSubject(GameObject *sbj) throw(...);
    void setInitialPosition(const utils::Point &pos);

};

}}
